<?php

namespace hotel\common\models;

use Yii;

class RoomType extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'room_type';
    }

    public function getRoom()
    {
        return $this->hasMany(RoomTypeOff::className(), ['room_type_id' => 'id'])->groupBy('date');
    }

    public function getActivityoff()
    {
        return $this->hasMany(RoomTypeActivityOff::className(), ['room_type_id' => 'id'])->groupBy('date');
    }

    public function getActivity()
    {
        return $this->hasMany(RoomTypeActivity::className(), ['room_type_id' => 'id']);
    }

}
